#include <iostream>
#include <vector>
#include <unordered_set>
#include <cstring>
#include <cmath>
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
#define endl '\n'
const int N = 2e2 + 10;
int f[N][N];
int n, m;
int sg(int n, int m)
{
    if(f[n][m] != -1) return f[n][m];
    unordered_set<int> mp;
    for(int i = 2; i <= n - 2; i++) mp.insert(sg(i, m) ^ sg(n - i, m));
    for(int j = 2; j <= m - 2; j++) mp.insert(sg(n, j) ^ sg(n, m - j));
    for(int i = 0; ; i++) 
        if(!mp.count(i))
            return f[n][m] = f[m][n] = i;
}

int main()
{
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    memset(f, -1, sizeof f);
    while(cin >> n >> m)
    {
        int ret = sg(n, m);
        if(ret) cout << "WIN" << endl;
        else cout << "LOSE" << endl;
    }
	return 0;
}